Masala #0365
Bilmasvoyga yordam 2
Bu gal Bilmasvoy shamollab qoldi va algebra darsiga bora olmadi, ustozi esa juda qiyin mavzuni o’tib bergan ekan. Bilmasvoy ustozidan darsdan so’ng shu mavzuni ertaga so’rab oladi, ungacha siz bilmasvoyga quyidagi formulani hisoblashda yordam bering:
\(\dfrac{1}{\sqrt{1} + \sqrt{3}} + \dfrac{1}{\sqrt{5} + \sqrt{7}} + \dots \dfrac{1}{\sqrt{n-2} + \sqrt{n}}\)
Kirish faylining yagona satrida bitta natural son \(n \le 10^9\)
Chiqish faylida masala javobining butun qismini chop eting, agar buni hisoblashni iloji bolmasa -1 chiqarilsin
# | input.txt | output.txt |
---|---|---|
1 |
7 |
0 |
Izoh: javobni yaxlitlamasdan chiqaring